package org.come.bean;

import org.come.until.JmSum;


public class LxPointBean {
    /**行*/
    private Integer lv;
    /**表ID*/
    private Integer tableId;
    /**最大点数*/
    private Integer maxPoint;
    /**当前学习点数*/
    private Integer nowPoint;

    public LxPointBean(int lv, int id, int max, int now) {
        this.lv = lv;
        setTableId(id);
        setMaxPoint(max);
        setNowPoint(now);
    }

    public Integer getLv() {
        return lv;
    }

    public void setLv(Integer lv) {
        this.lv = lv;
    }

    public Integer getTableId() {
        if (tableId == null) {
            setTableId(0);
        }
        return (int) JmSum.MZ(tableId);
    }

    public void setTableId(Integer tableId) {
        this.tableId = (int) JmSum.ZM(tableId);
    }

    public Integer getMaxPoint() {
        if (maxPoint == null) {
            setMaxPoint(0);
        }
        return (int) JmSum.MZ(maxPoint);
    }

    public void setMaxPoint(Integer maxPoint) {
        this.maxPoint = (int) JmSum.ZM(maxPoint);
    }

    public Integer getNowPoint() {
        if (nowPoint == null) {
            setNowPoint(0);
        }
        return (int) JmSum.MZ(nowPoint);
    }

    public void setNowPoint(Integer nowPoint) {
        this.nowPoint = (int) JmSum.ZM(nowPoint);
    }

    public String setPoint(Integer nowPoint) {
        setNowPoint(nowPoint);
        if (getNowPoint()>getMaxPoint()) {
            nowPoint=maxPoint;
            return getMaxPoint().toString();
        }
        return getNowPoint()+"/"+getMaxPoint();
    }
}
